package com.example.springbooteurekaconsumer.service;

import com.example.springbooteurekaconsumer.service.impl.ConsumerServiceFactoryImpl;
import com.example.springbooteurekaconsumer.service.impl.ConsumerServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "eurekaclient1",url = "http://127.0.0.1:8001",
        fallbackFactory = ConsumerServiceFactoryImpl.class,fallback = ConsumerServiceImpl.class)
public interface ConsumerService {

    @RequestMapping("getProduct")
    public String getProduct(@RequestParam String name);

}
